package com.tengju.motivation.domain.model.performance;

import com.tengju.motivation.domain.model.performance.MotivationActivityConfigObjectTypeEnum;
import com.tengju.motivation.domain.model.performance.PerformanceObjectiveTypeEnum;
import com.tengju.motivation.domain.shared.DomainException;
import com.tengju.motivation.domain.shared.DomainExceptionCode;


/**
 * @author: 李大仙
 * @date: 2021/7/23 10:13 上午
 */
public class MotivationPerformanceObjectiveTypeConvert {
    public static PerformanceObjectiveTypeEnum convert(MotivationActivityConfigObjectTypeEnum objectTypeEnum) {
        if (objectTypeEnum == MotivationActivityConfigObjectTypeEnum.SEC) {
            return PerformanceObjectiveTypeEnum.GEN_SEC;
        }
        throw DomainException.error(DomainExceptionCode.INVALID_DATA, "不支持的数据类型");
    }
}
